package com.lm.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.lm.pojo.Organization;
import com.lm.pojo.SearchOrganization;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

import java.util.List;

@Mapper
public interface OrgMapper extends BaseMapper<Organization> {
    //List<Organization> findList(@Param("organizationName")String organizationName);
    IPage<Organization> findList(IPage<Organization> page,@Param("organizationName")String organizationName);

    Integer findLastNumber();

    @Update("update organization set org_state = #{orgState} where org_id = #{orgId}")
    void changeState(@Param("orgId") Integer orgId, @Param("orgState")Integer orgState);

    List<Organization> findIdAndName();
}
